<html>
<head>
 
</head>
<body style="text-align=center;font-size:24px">
<div id="problemNum" style='background-color:#999999;width:400;text-align:left;'></div>
<div id="problemContent" style='background-color:#bbbbbb;width:400;text-align:left;'></div>
<div id="result" style='color:#ffff22;font-size:48;background-color:#8855ff;width:400;'></div>
 
<script language="javascript">
    //---------------------------------//
    // Project Euler 
    //
    // Author:thrombin
    //   Date:2015-12-07
    //---------------------------------//  
var p_order=6;//Problem Order
var problem="The sum of the squares of the first ten natural numbers is,"
            +"1^2 + 2^2 + ... + 10^2 = 385"
            +"The square of the sum of the first ten natural numbers is,"
            +"(1 + 2 + ... + 10)^2 = 55^2 = 3025"
            +"Hence the difference between the sum of the squares of the first ten natural numbers and the square of the sum is 3025-385 = 2640."
            +"Find the difference between the sum of the squares of the first one hundred natural numbers and the square of the sum.";
//solve the problem
 
var result=1;
var N=100;
 
result = (N*(N+1)/2)*(N*(N+1)/2)-N*(N+1)*(2*N+1)/6;
//update browser
document.getElementById("problemNum").innerHTML="Project Euler-Problem "+p_order;
document.getElementById("problemContent").innerHTML=problem;
document.getElementById("result").innerHTML="Answer:"+result;
 
</script>
</body>
</html>